package com.skp.shaphan.ui.results;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;

import com.skp.shaphan.actions.ExportDataAction;
import com.skp.shaphan.ui.dialogs.DataExportDialog;

/**
 * Launches the export dialog to export data from the program.
 * @author Stephen Phillips
 * @see ExportDataAction
 * @see DataExportDialog
 *
 */
public class ExportButton extends JButton implements ActionListener {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 888027827914005103L;

	public ExportButton() {
		super("Export");
		this.addActionListener(this);
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		//  Changed to use dialog created by Visual Swing
		//ExportDialog export = new ExportDialog();
		//export.setVisible(true);
		
		(new DataExportDialog()).setVisible(true);
	}

}
